// by Xeno

private "_exitj";
if (!X_Client) exitWith {};

if (!d_heli_taxi_available) exitWith {localize "MSG_DOM_AIRTAXIINAIR" call XfHQChat};

if (FLAG_BASE distance player < 500) exitWith {format [localize "MSG_DOM_AIRTAXITOOCLOSE", 500] call XfHQChat};

[player, localize "MSG_DOM_AIRTAXICALLING"] call XfSideChat;

sleep 5;

localize "MSG_DOM_AIRTAXISTARTING" call XfHQChat;

d_heli_taxi_available = false;

["d_air_taxi", player] call XNetCallEvent;